<span style="font-family:Microsoft YaHei;font-size:14px;"><!DOCTYPE html>  
<html lang="en">  
<head>  
    <meta charset="UTF-8">  
    <title>Jsbarcode测试</title>  
    <!--百度jQuery引用地址-->  
    <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>  
    <script type="text/javascript" src="js/JsBarcode.all.js"></script>  
</head>  
<body>  
    <!--方式1-->  
    <svg id="barcode"></svg>  
    <hr>  
    <!--方式2-->  
    <canvas id="canvas"></canvas>  
    <hr>  
    <!--方式3-->  
    <img id="bcode"/>  
    <hr>  
    <script>  
        $("#barcode").JsBarcode('Hi!');//or JsBarcode("#barcode", "Hi!");  
  
        $("#canvas").JsBarcode('Hello world!');//or JsBarcode("#barcode", "Hello world!");  
  
        $("#bcode").JsBarcode("I'm bwju!");//or JsBarcode("#barcode", "I'm bwju!");  
    </script>  
</body>  
</html></span>  